import {
	request
} from '@/pages_nbst/utils/request.js'


export function login(code) {
	return request({
		url: `wx/user/token/${code}`,
		method: 'post',
		reqCheckToken: false,
	})
}

export function getUser() {
	return request({
		url: `wx/user`,
		method: 'get',
	})
}

export function updateUserPhone(code) {
	return request({
		url: `wx/user/phone/${code}`,
		method: 'post',
	})
}

export function updateUserFrom(from) {
	return request({
		url: `wx/user/from`,
		method: 'post',
		data: {from}
	})
}